home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / acpi / resume.d / 72-acpi-pain.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2006-10-15  |  662 b   |  36 lines

  1. #!/bin/sh
  2.  
  3. # Some hardware gets unhappy about button events unless we do this
  4. modprobe -r button
  5. modprobe button
  6.  
  7. # Kick the fans
  8. modprobe -r fan
  9. modprobe -r thermal
  10. modprobe fan
  11. modprobe thermal
  12.  
  13. if [ "`grep ibm_acpi /proc/modules`" ]; then
  14.     # No, I don't know why
  15.     modprobe -r ibm-acpi
  16.     modprobe ibm-acpi
  17. fi
  18.  
  19. # NNGH FAN HATE
  20. for x in /proc/acpi/fan/*; do
  21.     if [ "`grep on $x/state`" ]; then
  22.         echo -n 3 > $x/state;
  23.         echo -n 0 > $x/state;
  24.     fi
  25. done
  26.  
  27. # Make sure that the drive power state is set correctly again
  28. modprobe -r acpi_sbs
  29. modprobe -r ac
  30. modprobe ac
  31. modprobe -r battery
  32. modprobe battery
  33. modprobe acpi_sbs
  34. /etc/acpi/power.sh
  35.  
  36.